/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package binh;

import we.dispatcher.CPacketReader;

/**
 *
 * @author ADMIN
 */
public abstract class CGameLogic implements ILoopable
{

    public CTable Table;

    public CGameLogic(CTable Table)
    {
        this.Table = Table;
    }

    public abstract void OnReceive(CClient Client, int CmdId, CPacketReader Reader);

    abstract public boolean CanJoinTable(CClient Client);
    // Start Logic Game
    // Called when user request start game

    abstract public void StartGame();
    // This funtion called when:
    // - The game finish
    // - Player exit game and have 1 player in game

    abstract public void EndGame();
    // Called when player exit game while the game playing

    abstract public void OnClientExit(CClient Client);
    // Send Game Data to Viewer

    abstract public void SendViewerData(CClient Viewer);
}
